<?php
use dmstr\widgets\Menu;
echo Menu::widget(
            [
                'options' => ['class' => 'sidebar-menu'],
                'items' => [
                    ['label' => 'Menu', 'options' => ['class' => 'header']],
                    [
                        'label' => Yii::t('app', '会员列表'),
                        'url' => ['/member/index'],
                        'icon' => 'fa fa-group',
                        'active' => 'member' === Yii::$app->controller->id && ('index' === Yii::$app->controller->action->id || 'update' === Yii::$app->controller->action->id || 'create' === Yii::$app->controller->action->id),
                        'visible' => \Yii::$app->user->can('member/index'),
                    ],
                    [
                        'label' => Yii::t('app', '会员审核'),
                        'url' => ['/'],
                        'icon' => 'fa fa-align-left',
                        'items' => [
                            [
                                'label' => Yii::t('app', '待审核会员'),
                                'url' => ['/member/waitcheck'],
                                'icon' => 'fa fa-th-list',
                                'active' => 'member' === Yii::$app->controller->id && 'waitcheck' === Yii::$app->controller->action->id,
								 'visible' => \Yii::$app->user->can('member/waitcheck'),
                            ],

                            [
                                'label' => Yii::t('app', '已审核会员'),
                                'url' => ['/member/check'],
                                'icon' => 'fa  fa-indent',
                                'active' => 'member' === Yii::$app->controller->id && 'check' === Yii::$app->controller->action->id,
								'visible' => \Yii::$app->user->can('member/check'),
                            ],
                            [
                                'label' => Yii::t('app', '再审核会员'),
                                'url' => ['/member/uncheck'],
                                'icon' => 'fa fa-th-list',
                                'active' => 'member' === Yii::$app->controller->id && 'uncheck' === Yii::$app->controller->action->id,
								'visible' => \Yii::$app->user->can('member/uncheck'),
                            ],
                        ],
                    ],
					[
                        'label' => Yii::t('app', '会员共享'),
                        'url' => ['/'],
                        'icon' => 'fa fa-align-left',
                        'visible' => \Yii::$app->user->can('member/share'),
                        'items' => [
                            [
                                'label' => Yii::t('app', '共享给我的'),
                                'url' => ['/member/shareme'],
                                'icon' => 'fa fa-th-list',
                                'active' => 'member' === Yii::$app->controller->id && 'shareme' === Yii::$app->controller->action->id,
                                'visible' => \Yii::$app->user->can('member/shareme'),
                            ],

                            [
                                'label' => Yii::t('app', '共享给别人'),
                                'url' => ['/member/sharehei'],
                                'icon' => 'fa  fa-indent',
                                'active' => 'member' === Yii::$app->controller->id && 'sharehei' === Yii::$app->controller->action->id,
                                'visible' => \Yii::$app->user->can('member/sharehei'),
                            ],

                        ],
                    ],
                    [
                        'label' => Yii::t('app', '会员等级'),
                        'url' => ['/grade'],
                        'icon' => 'fa  fa-table',
                        'active' => 'grade' === Yii::$app->controller->id,
                        'visible' => \Yii::$app->user->can('grade/index'),
                    ],
                    [
                        'label' => Yii::t('app', '会员优惠'),
                        'url' => ['/gradeship'],
                        'icon' => 'fa fa-credit-card',
                        'active' => 'gradeship' === Yii::$app->controller->id,
                       // 'visible' => \Yii::$app->user->can('gradeship/index'),
                    ],
                ],
            ]
        )

?>